Dynamically determining and monitoring workspace safe zones using semantic representations of workpieces

ABSTRACT

Embodiments of the present invention determine the configuration of a workpiece and whether it is actually being handled by a monitored piece of machinery, such as a robot. The problem solved by the invention is especially challenging in real-world factory environments because many objects, most of which are not workpieces, may be in proximity to the machinery. Accordingly, embodiments of the invention utilize semantic understanding to distinguish between workpieces that may become associated with the robot and other objects (and humans) in the workspace that will not, and detect when the robot is carrying a workpiece.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to and the benefit of, and incorporatesherein by reference in their entireties, U.S. Provisional PatentApplication Nos. 62/455,828 and 62/455,834, both filed on Feb. 7, 2017.

FIELD OF THE INVENTION

The field of the invention relates, generally, to monitoring ofindustrial environments where humans and machinery interact or come intoproximity, and in particular to systems and methods for detecting unsafeconditions in a monitored workspace.

BACKGROUND

Industrial robotic arms have been used in manufacturing processes fordecades, and range in size from smaller than a human arm—with payloadsas small as a few pounds—up to many times the size of an entire humanwith payloads of hundreds or thousands of pounds, which can also be manyfeet in length and width. Typically, robot arms consist of a number ofmechanical links connected by rotating joints that can be preciselycontrolled, and a controller that coordinates all of the joints toachieve trajectories that are determined by an industrial engineer for aspecific application.

Because these robots are large, strong, and fast, they are capable ofdoing severe harm to a human over a wide “envelope” of possible movementtrajectories. When industrial robots first came into widespread use, nosufficiently reliable sensing technologies were available to sensehumans and other obstacles. For this reason, industrial robotstraditionally have been enclosed by cages, typically made of metal, thatprevent humans from approaching anywhere within the robot's reach. Asprecise sensing and control technologies became available, they began toreplace cages in some applications, but for safety are typicallyconfigured to respond—e.g., by shutting down or limiting operation ofthe robot—when any intrusion is detected in an exclusion zone defined bythe robot's movement envelope.

Because both floor space and robot operating time are preciouscommodities in factory settings, limiting the exclusion zone dictated bythe movement envelope would be desirable so long as safety is notcompromised. One factor contributing to larger-than-needed exclusionzones is the need to consider movement not only of the robot but alsoany workpieces grasped by or otherwise associated with movable portionsof the robot. Even if a robot picks up the largest workpiece veryinfrequently, safety typically demands defining the exclusion zone basedon the worst-case scenario. Moreover, if the robot begins handling newworkpieces, it may be necessary to recompute the entire exclusion zone—acumbersome and often-demanding task.

Accordingly, there is a need for the ability to dynamically configureand reconfigure safe zones based on whether a robot is actually handlinga workpiece as well as the workpiece configuration.

Additionally as modern workcells grow more complex, and especially asprocesses are developed that require both manual and automated steps, itbecomes more and more difficult to implement safe interaction in termsof whether or not there is any intrusion detected in a given zone. Forexample, there may be an area of the workcell that must be occupied by ahuman during one part of a process, but during another part of theprocess the workpiece intrudes into that same physical space. In orderto support such a process with existing technology, complex custom statemachines must be implemented in control equipment, or in many cases theprocess must be carefully constrained to avoid such situations, oftenrequiring the use of additional machinery.

What is needed, instead, is a system that provides semanticunderstanding of the various elements of the workcell; in particular,the robot, the workpiece and human workers. Safety can then beimplemented in terms of a set of semantic rules: a robot may touch aworkpiece; a robot may not touch a person; when a robot is carrying aworkpiece carrying a workpiece, the workpiece may not be allowed totouch a person. Given this framework, a wide variety of complexprocesses may be implemented without extensive custom logic oradditional design effort and machinery.

SUMMARY

Embodiments of the present invention determine the configuration of aworkpiece and whether it is actually being handled by a monitored pieceof machinery, such as a robot. The problem solved by the invention isespecially challenging in real-world factory environments because manyobjects, most of which are not workpieces, may be in proximity to themachinery. Accordingly, embodiments of the invention utilize semanticunderstanding to distinguish between workpieces that may becomeassociated with the machinery and other objects (and humans) in theworkspace that will not, and detect when, for example, a robot iscarrying a workpiece. In this instance, the workpiece is treated as partof the robot for purposes of establishing an envelope of possible robottrajectories. The envelope is tracked as the robot and workpiece movetogether in the workcell and occupied space corresponding thereto aredynamically marked as not empty and not safe. 3D spaces occluded by therobot-workpiece combination are marked as not empty unless independentverification of emptiness can be obtained from additional sensors.

In various embodiments, the system includes a plurality of sensorsdistributed about the workspace. Each of the sensors includes or isassociated with a grid of pixels for recording representations of aportion of the workspace within a sensor field of view; the workspaceportions collectively cover the entire workspace. A computer memorystores (i) a series of images from the sensors, (ii) a model of therobot and its permitted movements, and (iii) a safety protocolspecifying speed restrictions of a robot in proximity to a human and aminimum separation distance between a robot and a human. A processor isconfigured to generate, from the stored images, a spatial representationof the workspace (e.g., as volumes, which may correspond to voxels,i.e., 3D pixels). The processor identifies and monitors, over time, arepresentation of space occupied by the robot within the workspace as arobot region in the volume. The processor generates, around the robotregion, an envelope region spanning the permitted movements of the robotin accordance with the stored model.

The processor also identifies and monitors volumes that representworkpieces. This recognition may be aided by information about physicalshape of the workpieces determined during a configuration process, whichcould consist of CAD models, 3D scans, or 3D models learned by thesystem during a teaching phase. These workpiece volumes are thencharacterized as definitively not occupied by a human, and thereforepermissible for the robot to approach per the safety protocol.Additionally, the processor recognizes interaction between the robot anda workpiece within the workspace, and in response to the recognizedinteraction, updates the robot region to include the workpiece andupdates the envelope region in accordance with the stored model and theupdated robot region. The processor generates a safe zone around therobot region, as updated, in accordance with the safety protocol.

In general, as used herein, the term “substantially” means ±10%, and insome embodiments, ±5%. In addition, reference throughout thisspecification to “one example,” “an example,” “one embodiment,” or “anembodiment” means that a particular feature, structure, orcharacteristic described in connection with the example is included inat least one example of the present technology. Thus, the occurrences ofthe phrases “in one example,” “in an example,” “one embodiment,” or “anembodiment” in various places throughout this specification are notnecessarily all referring to the same example. Furthermore, theparticular features, structures, routines, steps, or characteristics maybe combined in any suitable manner in one or more examples of thetechnology. The headings provided herein are for convenience only andare not intended to limit or interpret the scope or meaning of theclaimed technology.

BRIEF DESCRIPTION OF THE DRAWINGS

In the drawings, like reference characters generally refer to the sameparts throughout the different views. Also, the drawings are notnecessarily to scale, with an emphasis instead generally being placedupon illustrating the principles of the invention. In the followingdescription, various embodiments of the present invention are describedwith reference to the following drawings, in which:

FIG. 1 is a perspective view of a monitored workspace in accordance withan embodiment of the invention.

FIG. 2 schematically illustrates classification of regions within themonitored workspace in accordance with an embodiment of the invention.

FIG. 3 schematically illustrates a control system in accordance with anembodiment of the invention.

FIG. 4 schematically illustrates an object-monitoring system inaccordance with an embodiment of the invention.

FIG. 5 schematically illustrates the definition of progressive safetyenvelopes in proximity to a piece of industrial machinery.

DETAILED DESCRIPTION

In the following discussion, we describe an integrated system formonitoring a workspace, classifying regions therein for safety purposes,and dynamically identifying safe states. In some cases the latterfunction involves semantic analysis of a robot in the workspace andidentification of the workpieces with which it interacts. It should beunderstood, however, that these various elements may be implementedseparately or together in desired combinations; the inventive aspectsdiscussed herein do not require all of the described elements, which areset forth together merely for ease of presentation and to illustratetheir interoperability. The system as described represents merely oneembodiment.

1. Workspace Monitoring

Refer first to FIG. 1, which illustrates a representative 3D workspace100 monitored by a plurality of sensors representatively indicated at102 ₁, 102 ₂, 102 ₃. The sensors 102 may be conventional optical sensorssuch as cameras, e.g., 3D time-of-flight cameras, stereo vision cameras,or 3D LIDAR sensors or radar-based sensors, ideally with high framerates (e.g., between 30 Hz and 100 Hz). The mode of operation of thesensors 102 is not critical so long as a 3D representation of theworkspace 100 is obtainable from images or other data obtained by thesensors 102. As shown in the figure, sensors 102 collectively cover andcan monitor the workspace 100, which includes a robot 106 controlled bya conventional robot controller 108. The robot interacts with variousworkpieces W, and a person P in the workspace 100 may interact with theworkpieces and the robot 108. The workspace 100 may also contain variousitems of auxiliary equipment 110, which can complicate analysis of theworkspace by occluding various portions thereof from the sensors.Indeed, any realistic arrangement of sensors will frequently be unableto “see” at least some portion of an active workspace. This isillustrated in the simplified arrangement of FIG. 1: due to the presenceof the person P, at least some portion of robot controller 108 may beoccluded from all sensors. In an environment that people traverse andwhere even stationary objects may be moved from time to time, theunobservable regions will shift and vary.

As shown in FIG. 2, embodiments of the present invention classifyworkspace regions as occupied, unoccupied (or empty), or unknown. Forease of illustration, FIG. 2 shows two sensors 202 ₁, 202 ₂ and theirzones of coverage 205 ₁, 205 ₂ within the workspace 200 in twodimensions; similarly, only the 2D footprint 210 of a 3D object isshown. The portions of the coverage zones 205 between the objectboundary and the sensors 200 are marked as unoccupied, because eachsensor affirmatively detects no obstructions in this intervening space.The space at the object boundary is marked as occupied. In a coveragezone 205 beyond an object boundary, all space is marked as unknown; thecorresponding sensor is configured to sense occupancy in this regionbut, because of the intervening object 210, cannot do so.

With renewed reference to FIG. 1, data from each sensor 102 is receivedby a control system 112. The volume of space covered by eachsensor—typically a solid cone—may be represented in any suitablefashion, e.g., the space may be divided into a 3D grid of small (5 cm,for example) cubes or “voxels” or other suitable form of volumetricrepresentation. For example, workspace 100 may be represented using 2Dor 3D ray tracing, where the intersections of the 2D or 3D raysemanating from the sensors 102 are used as the volume coordinates of theworkspace 100. This ray tracing can be performed dynamically or via theuse of precomputed volumes, where objects in the workspace 100 arepreviously identified and captured by control system 112. Forconvenience of presentation, the ensuing discussion assumes a voxelrepresentation; control system 112 maintains an internal representationof the workspace 100 at the voxel level, with voxels marked as occupied,unoccupied, or unknown.

FIG. 3 illustrates, in greater detail, a representative embodiment ofcontrol system 112, which may be implemented on a general-purposecomputer. The control system 112 includes a central processing unit(CPU) 305, system memory 310, and one or more non-volatile mass storagedevices (such as one or more hard disks and/or optical storage units)312. The system 112 further includes a bidirectional system bus 315 overwhich the CPU 305, memory 310, and storage device 312 communicate witheach other as well as with internal or external input/output (I/O)devices such as a display 320 and peripherals 322, which may includetraditional input devices such as a keyboard or a mouse). The controlsystem 112 also includes a wireless transceiver 325 and one or more I/Oports 327. Transceiver 325 and I/O ports 327 may provide a networkinterface. The term “network” is herein used broadly to connote wired orwireless networks of computers or telecommunications devices (such aswired or wireless telephones, tablets, etc.). For example, a computernetwork may be a local area network (LAN) or a wide area network (WAN).When used in a LAN networking environment, computers may be connected tothe LAN through a network interface or adapter; for example, asupervisor may establish communication with control system 112 using atablet that wirelessly joins the network. When used in a WAN networkingenvironment, computers typically include a modem or other communicationmechanism. Modems may be internal or external, and may be connected tothe system bus via the user-input interface, or other appropriatemechanism. Networked computers may be connected over the Internet, anIntranet, Extranet, Ethernet, or any other system that providescommunications. Some suitable communications protocols include TCP/IP,UDP, or OSI, for example. For wireless communications, communicationsprotocols may include IEEE 802.11x (“Wi-Fi”), BLUETOOTH, ZigBee, IrDa,near-field communication (NFC), or other suitable protocol. Furthermore,components of the system may communicate through a combination of wiredor wireless paths, and communication may involve both computer andtelecommunications networks.

CPU 305 is typically a microprocessor, but in various embodiments may bea microcontroller, peripheral integrated circuit element, a CSIC(customer-specific integrated circuit), an ASIC (application-specificintegrated circuit), a logic circuit, a digital signal processor, aprogrammable logic device such as an FPGA (field-programmable gatearray), PLD (programmable logic device), PLA (programmable logic array),RFID processor, graphics processing unit (GPU), smart chip, or any otherdevice or arrangement of devices that is capable of implementing thesteps of the processes of the invention.

The system memory 310 contains a series of frame buffers 335, i.e.,partitions that store, in digital form (e.g., as pixels or voxels, or asdepth maps), images obtained by the sensors 102; the data may actuallyarrive via I/O ports 327 and/or transceiver 325 as discussed above.System memory 310 contains instructions, conceptually illustrated as agroup of modules, that control the operation of CPU 305 and itsinteraction with the other hardware components. An operating system 340(e.g., Windows or Linux) directs the execution of low-level, basicsystem functions such as memory allocation, file management andoperation of mass storage device 312. At a higher level, and asdescribed in greater detail below, an analysis module 342 registers theimages in frame buffers 335 and analyzes them to classify regions of themonitored workspace 100. The result of the classification may be storedin a space map 345, which contains a volumetric representation of theworkspace 100 with each voxel (or other unit of representation) labeled,within the space map, as described herein. Alternatively, space map 345may simply be a 3D array of voxels, with voxel labels being stored in aseparate database (in memory 310 or in mass storage 312).

Control system 112 may also control the operation or machinery in theworkspace 100 using conventional control routines collectively indicatedat 350. As explained below, the configuration of the workspace and,consequently, the classifications associated with its voxelrepresentation may well change over time as persons and/or machines moveabout, and control routines 350 may be responsive to these changes inoperating machinery to achieve high levels of safety. All of the modulesin system memory 310 may be programmed in any suitable programminglanguage, including, without limitation, high-level languages such as C,C++, C#, Ada, Basic, Cobra, Fortran, Java, Lisp, Perl, Python, Ruby, orlow-level assembly languages.

1.1 Sensor Registration

In a typical multi-sensor system, the precise location of each sensor102 with respect to all other sensors is established during setup.Sensor registration is usually performed automatically, and should be assimple as possible to allow for ease of setup and reconfiguration.Assuming for simplicity that each frame buffer 335 stores an image(which may be refreshed periodically) from a particular sensor 102,analysis module 342 may register sensors 102 by comparing all or part ofthe image from each sensor to the images from other sensors in framebuffers 335, and using conventional computer-vision techniques toidentify correspondences in those images. Suitable global-registrationalgorithms, which do not require an initial registration approximation,generally fall into two categories: feature-based methods andintensity-based methods. Feature-based methods identify correspondencesbetween image features such as edges while intensity-based methods usecorrelation metrics between intensity patterns. Once an approximateregistration is identified, an Iterative Closest Point (ICP) algorithmor suitable variant thereof may be used to fine-tune the registration.

If there is sufficient overlap between the fields of view of the varioussensors 102, and sufficient detail in the workspace 100 to providedistinct sensor images, it may be sufficient to compare images of thestatic workspace. If this is not the case, a “registration object”having a distinctive signature in 3D can be placed in a location withinworkspace 100 where it can be seen by all sensors. Alternatively,registration can be achieved by having the sensors 102 record images ofone or more people standing in the workspace or walking throughout theworkspace over a period of time, combining a sufficient number ofpartially matching images until accurate registration is achieved.

Registration to machinery within the workspace 100 can, in some cases,be achieved without any additional instrumentation, especially if themachinery has a distinctive 3D shape (for example, a robot arm), so longas the machinery is visible to at least one sensor registered withrespect to the others. Alternatively, a registration object can be used,or a user interface, shown in display 320 and displaying the sceneobserved by the sensors, may allow a user to designate certain parts ofthe image as key elements of the machinery under control. In someembodiments, the interface provides an interactive 3D display that showsthe coverage of all sensors to aid in configuration. If the system is beconfigured with some degree of high-level information about themachinery being controlled (for purposes of control routines 350, forexample)—such as the location(s) of dangerous part or parts of themachinery and the stopping time and/or distance—analysis module 342 maybe configured to provide intelligent feedback as to whether the sensorsare providing sufficient coverage, and suggest placement for additionalsensors.

For example, analysis module 342 can be programmed to determine theminimum distance from the observed machinery at which it must detect aperson in order to stop the machinery by the time the person reaches it(or a safety zone around it), given conservative estimates of walkingspeed. (Alternatively, the required detection distance can be inputdirectly into the system via display 320.) Optionally, analysis module342 can then analyze the fields of view of all sensors to determinewhether the space is sufficiently covered to detect all approaches. Ifthe sensor coverage is insufficient, analysis module 342 can propose newlocations for existing sensors, or locations for additional sensors,that would remedy the deficiency. Otherwise, the control system willdefault to a safe state and control routines 350 will not permitmachinery to operate unless analysis module 342 verifies that allapproaches can be monitored effectively. Use of machine learning andgenetic or evolutionary algorithms can be used to determine optimalsensor placement within a cell. Parameters to optimize include but arenot limited to minimizing occlusions around the robot during operationand observability of the robot and workpieces.

If desired, this static analysis may include “background” subtraction.During an initial startup period, when it may be safely assumed there noobjects intruding into the workspace 100, analysis module 342 identifiesall voxels occupied by the static elements. Those elements can then besubtracted from future measurements and not considered as potentialintruding objects. Nonetheless, continuous monitoring is performed toensure that the observed background image is consistent with the spacemap 345 stored during the startup period. Background can also be updatedif stationary objects are removed or are added to the workspace

There may be some areas that sensors 102 cannot observe sufficiently toprovide safety, but that are guarded by other methods such as cages,etc. In this case, the user interface can allow the user to designatethese areas as safe, overriding the sensor-based safety analysis.Safety-rated soft-axis and rate limitations can also be used to limitthe envelope of the robot to improve performance of the system.

Once registration has been achieved, sensors 102 should remain in thesame location and orientation while the workspace 100 is monitored. Ifone or more sensors 102 are accidentally moved, the resulting controloutputs will be invalid and could result in a safety hazard. Analysismodule 342 may extend the algorithms used for initial registration tomonitor continued accuracy of registration. For example, during initialregistration analysis module 342 may compute a metric capturing theaccuracy of fit of the observed data to a model of the work cell staticelements that is captured during the registration process. As the systemoperates, the same metric can be recalculated. If at any time thatmetric exceeds a specified threshold, the registration is considered tobe invalid and an error condition is triggered; in response, if anymachinery is operating, a control routine 350 may halt it or transitionthe machinery to a safe state.

1.2 Identifying Occupied and Potentially Occupied Areas

Once the sensors have been registered, control system 112 periodicallyupdates space map 345—at a high fixed frequency (e.g., every analysiscycle) in order to be able to identify all intrusions into workspace100. Space map 345 reflects a fusion of data from some or all of thesensors 102. But given the nature of 3D data, depending on the locationsof the sensors 102 and the configuration of workspace 100, it ispossible that an object in one location will occlude the sensor's viewof objects in other locations, including objects (which may includepeople or parts of people, e.g. arms) that are closer to the dangerousmachinery than the occluding object. Therefore, to provide a reliablysafe system, the system monitors occluded space as well as occupiedspace.

In one embodiment, space map 345 is a voxel grid. In general, each voxelmay be marked as occupied, unoccupied or unknown; only empty space canultimately be considered safe, and only when any additional safetycriteria—e.g., minimum distance from a piece of controlled machinery—issatisfied. Raw data from each sensor is analyzed to determine whether,for each voxel, an object or boundary of the 3D mapped space has beendefinitively detected in the volume corresponding to that voxel. Toenhance safety, analysis module 342 may designate as empty only voxelsthat are observed to be empty by more than one sensor 102. Again, allspace that cannot be confirmed as empty is marked as unknown. Thus, onlyspace between a sensor 102 and a detected object or mapped 3D spaceboundary along a ray may be marked as empty.

If a sensor detects anything in a given voxel, all voxels that lie onthe ray beginning at the focal point of that sensor and passing throughthe occupied voxel, and which are between the focal point and theoccupied voxel, are classified as unoccupied, while all voxels that liebeyond the occupied voxel on that ray are classified as occluded forthat sensor; all such occluded voxels are considered “unknown.”Information from all sensors may be combined to determine which areasare occluded from all sensors; these areas are considered unknown andtherefore unsafe. Analysis module 342 may finally mark as “unoccupied”only voxels or workspace volumes that have been preliminarily marked atleast once (or, in some embodiments, at least twice) as “unoccupied.”Based on the markings associated with the voxels or discrete volumeswithin the workspace, analysis module 342 may map one or more safevolumetric zones within space map 345. These safe zones are outside asafety zone of the machinery and include only voxels or workspacevolumes marked as unoccupied.

A common failure mode of active optical sensors that depend onreflection, such as LIDAR and time-of-flight cameras, is that they donot return any signal from surfaces that are insufficiently reflective,and/or when the angle of incidence between the sensor and the surface istoo shallow. This can lead to a dangerous failure because this signalcan be indistinguishable from the result that is returned if no obstacleis encountered; the sensor, in other words, will report an empty voxeldespite the possible presence of an obstacle. This is why ISO standardsfor e.g. 2D LIDAR sensors have specifications for the minimumreflectivity of objects that must be detected; however, thesereflectivity standards can be difficult to meet for some 3D sensormodalities such as ToF. In order to mitigate this failure mode, analysismodule 342 marks space as empty only if some obstacle is definitivelydetected at further range along the same ray. By pointing sensorsslightly downward so that most of the rays will encounter the floor ifno obstacles are present, it is possible to conclusively analyze most ofthe workspace 100. But if the sensed light level in a given voxel isinsufficient to definitively establish emptiness or the presence of aboundary, the voxel is marked as unknown. The signal and threshold valuemay depend on the type of sensor being used. In the case of anintensity-based 3D sensor (for example, a time-of-flight camera) thethreshold value can be a signal intensity, which may be attenuated byobjects in the workspace of low reflectivity. In the case of a stereovision system, the threshold may be the ability to resolve individualobjects in the field of view. Other signal and threshold valuecombinations can be utilized depending on the type of sensor used.

A safe system can be created by treating all unknown space as though itwere occupied. However, in some cases this may be overly conservativeand result in poor performance. It is therefore desirable to furtherclassify unknown space according to whether it could potentially beoccupied. As a person moves within a 3D space, he or she will typicallyocclude some areas from some sensors, resulting in areas of space thatare temporarily unknown (see FIG. 1). Additionally, moving machinerysuch as an industrial robot arm can also temporarily occlude some areas.When the person or machinery moves to a different location, one or moresensors will once again be able to observe the unknown space and returnit to the confirmed-empty state in which it is safe for the robot ormachine to operate. Accordingly, in some embodiments, space may also beclassified as “potentially occupied.” Unknown space is consideredpotentially occupied when a condition arises where unknown space couldbe occupied. This could occur when unknown space is adjacent to entrypoints to the workspace or if unknown space is adjacent to occupied orpotentially occupied space. The potentially occupied space “infects”unknown space at a rate that is representative of a human moving throughthe workspace. Potentially occupied space stays potentially occupieduntil it is observed to be empty. For safety purposes, potentiallyoccupied space is treated the same as occupied space. It may bedesirable to use probabilistic techniques such as those based onBayesian filtering to determine the state of each voxel, allowing thesystem to combine data from multiple samples to provide higher levels ofconfidence in the results. Suitable models of human movement, includingpredicted speeds (e.g., an arm may be raised faster than a person canwalk), are readily available.

2. Classifying Objects

For many applications, the classification of regions in a workspace asdescribed above may be sufficient—e.g., if control system 112 ismonitoring space in which there should be no objects at all duringnormal operation. In many cases, however, it is desirable to monitor anarea in which there are at least some objects during normal operation,such as one or more machines and workpieces on which the machine isoperating. In these cases, analysis module 342 may be configured toidentify intruding objects that are unexpected or that may be humans.One suitable approach to such classification is to cluster individualoccupied voxels into objects that can be analyzed at a higher level.

To achieve this, analysis module 342 may implement any of severalconventional, well-known clustering techniques such as Euclideanclustering, K-means clustering and Gibbs-sampling clustering. Any ofthese or similar algorithms can be used to identify clusters of occupiedvoxels from 3D point cloud data. Mesh techniques, which determine a meshthat best fits the point-cloud data and then use the mesh shape todetermine optimal clustering, may also be used. Once identified, theseclusters can be useful in various ways.

One simple way clustering can be used is to eliminate small groups ofoccupied or potentially occupied voxels that are too small to possiblycontain a person. Such small clusters may arise from occupation andocclusion analysis, as described above, and can otherwise cause controlsystem 112 to incorrectly identify a hazard. Clusters can be trackedover time by simply associating identified clusters in each image framewith nearby clusters in previous frames or using more sophisticatedimage-processing techniques. The shape, size, or other features of acluster can be identified and tracked from one frame to the next. Suchfeatures can be used to confirm associations between clusters from frameto frame, or to identify the motion of a cluster. This information canbe used to enhance or enable some of the classification techniquesdescribed below. Additionally, tracking clusters of points can beemployed to identify incorrect and thus potentially hazardoussituations. For example, a cluster that was not present in previousframes and is not close to a known border of the field of view mayindicate an error condition.

In some cases it may be sufficient filter out clusters below a certainsize and to identify cluster transitions that indicate error states. Inother cases, however, it may be necessary to further classify objectsinto one or more of four categories: (1) elements of the machinery beingcontrolled by system 112, (2) the workpiece or workpieces that themachinery is operating on, and (3) other foreign objects, includingpeople, that may be moving in unpredictable ways and that can be harmedby the machinery. It may or may not be necessary to conclusivelyclassify people versus other unknown foreign objects. It may benecessary to definitively identify elements of the machinery as such,because by definition these will always be in a state of “collision”with the machinery itself and thus will cause the system to erroneouslystop the machinery if detected and not properly classified. Similarly,machinery typically comes into contact with workpieces, but it istypically hazardous for machinery to come into contact with people.Therefore, analysis module 342 should be able to distinguish betweenworkpieces and unknown foreign objects, especially people.

Elements of the machinery itself may be handled for classificationpurposes by the optional background-subtraction calibration stepdescribed above. In cases where the machinery changes shape, elements ofthe machinery can be identified and classified, e.g., by supplyinganalysis module 342 with information about these elements (e.g., asscalable 3D representations), and in some cases (such as industrialrobot arms) providing a source of instantaneous information about thestate of the machinery. Analysis module 342 may be “trained” byoperating machinery, conveyors, etc. in isolation under observation bythe sensors 102, allowing analysis module 342 to learn their preciseregions of operation resulting from execution of the full repertoire ofmotions and poses. Analysis module 342 may classify the resultingspatial regions as occupied.

Conventional computer-vision techniques may be employed to enableanalysis module 342 to distinguish between workpieces and humans. Theseinclude deep learning, a branch of machine learning designed to usehigher levels of abstraction in data. The most successful of thesedeep-learning algorithms have been convolutional neural networks (CNNs)and more recently recurrent neural networks (RNNs). However, suchtechniques are generally employed in situations where accidentalmisidentification of a human as a non-human does not cause safetyhazards. In order to use such techniques in the present environment, anumber of modifications may be needed. First, machine-learningalgorithms can generally be tuned to prefer false positives or falsenegatives (for example, logistic regression can be tuned for highspecificity and low sensitivity). False positives in this scenario donot create a safety hazard—if the robot mistakes a workpiece for ahuman, it will react conservatively. Additionally, multiple algorithmsor neural networks based on different image properties can be used,promoting the diversity that may be key to achieving sufficientreliability for safety ratings. One particularly valuable source ofdiversity can be obtained by using sensors that provide both 3D and 2Dimage data of the same object. If any one technique identifies an objectas human, the object will be treated as human. Using multiple techniquesor machine-learning algorithms, all tuned to favor false positives overfalse negatives, sufficient reliability can be achieved. In addition,multiple images can be tracked over time, further enhancingreliability—and again every object can be treated as human until enoughidentifications have characterized it as non-human to achievereliability metrics. Essentially, this diverse algorithmic approach,rather than identifying humans, identifies things that are definitelynot humans.

In addition to combining classification techniques, it is possible toidentify workpieces in ways that do not rely on any type of humanclassification at all. One approach is to configure the system byproviding models of workpieces. For example, a “teaching” step in systemconfiguration may simply supply images or key features of a workpiece toanalysis module 342, which searches for matching configurations in spacemap 345, or may instead involving training of a neural network toautomatically classify workpieces as such in the space map. In eithercase, only objects that accurately match the stored model are treated asworkpieces, while all other objects are treated as humans.

Another suitable approach is to specify particular regions within theworkspace, as represented in the space map 345, where workpieces willenter (such as the top of a conveyor belt). Only objects that enter theworkspace in that location are eligible for treatment as workpieces. Theworkpieces can then be modeled and tracked from the time they enter theworkspace until the time they leave. While a monitored machine such as arobot is handling a workpiece, control system 112 ensures that theworkpiece is moving only in a manner consistent with the expected motionof the robot end effector. Known equipment such as conveyor belts canalso be modeled in this manner. Humans may be forbidden from enteringthe work cell in the manner of a workpiece—e.g., sitting on conveyors.

All of these techniques can be used separately or in combination,depending on design requirements and environmental constraints. In allcases, however, there may be situations where analysis module 342 losestrack of whether an identified object is a workpiece. In thesesituations the system should to fall back to a safe state. An interlockcan then be placed in a safe area of the workspace where a human workercan confirm that no foreign objects are present, allowing the system toresume operation.

In some situations a foreign object enters the workspace, butsubsequently should be ignored or treated as a workpiece. For example, astack of boxes that was not present in the workspace at configurationtime may subsequently be placed therein. This type of situation, whichwill become more common as flexible systems replace fixed guarding, maybe addressed by providing a user interface (e.g., shown in display 320or on a device in wireless communication with control system 112) thatallows a human worker to designate the new object as safe for futureinteraction. Of course, analysis module 342 and control routines 350 maystill act to prevent the machinery from colliding with the new object,but the new object will not be treated as a potentially human objectthat could move towards the machinery, thus allowing the system tohandle it in a less conservative manner.

3. Generating Control Outputs

At this stage, analysis module 342 has identified all objects in themonitored area 100 that must be considered for safety purposes. Giventhis data, a variety of actions can be taken and control outputsgenerated. During static calibration or with the workspace in a defaultconfiguration free of humans, space map 345 may be useful to a human forevaluating sensor coverage, the configuration of deployed machinery, andopportunities for unwanted interaction between humans and machines. Evenwithout setting up cages or fixed guards, the overall workspace layoutmay be improved by channeling or encouraging human movement through theregions marked as safe zones, as described above, and away from regionswith poor sensor coverage.

Control routines 350, responsive to analysis module 342, may generatecontrol signals to operating machinery, such as robots, within workspace100 when certain conditions are detected. This control can be binary,indicating either safe or unsafe conditions, or can be more complex,such as an indication of what actions are safe and unsafe. The simplesttype of control signal is a binary signal indicating whether anintrusion of either occupied or potentially occupied volume is detectedin a particular zone. In the simplest case, there is a single intrusionzone and control system 112 provides a single output indicative of anintrusion. This output can be delivered, for example, via an I/O port327 to a complementary port on the controlled machinery to stop or limitthe operation of the machinery. In more complex scenarios, multiplezones are monitored separately, and a control routine 350 issues adigital output via an I/O port 327 or transceiver 325 addressed, over anetwork, to a target piece of machinery (e.g., using the Internetprotocol or other suitable addressing scheme).

Another condition that may be monitored is the distance between anyobject in the workspace and a machine, comparable to the output of a 2Dproximity sensor. This may be converted into a binary output byestablishing a proximity threshold below which the output should beasserted. It may also be desirable for the system to record and makeavailable the location and extent of the object closest to the machine.In other applications, such as a safety system for a collaborativeindustrial robot, the desired control output may include the location,shape, and extent of all objects observed within the area covered by thesensors 102.

4. Safe Action Constraints and Dynamic Determination of Safe Zones

ISO 10218 and ISO/TS 15066 describe speed and separation monitoring as asafety function that can enable collaboration between an industrialrobot and a human worker. Risk reduction is achieved by maintaining atleast a protective separation distance between the human worker androbot during periods of robot motion. This protective separationdistance is calculated using information including robot and humanworker position and movement, robot stopping distance, measurementuncertainty, system latency and system control frequency. When thecalculated separation distance decreases to a value below the protectiveseparation distance, the robot system is stopped. This methodology canbe generalized beyond industrial robotics to machinery.

For convenience, the following discussion focuses on dynamicallydefining a safe zone around a robot operating in the workspace 100. Itshould be understood, however, that the techniques described hereinapply not only to multiple robots but to any form of machinery that canbe dangerous when approached too closely, and which has a minimum safeseparation distance that may vary over time and with particularactivities undertaken by the machine. As described above, a sensor arrayobtains sufficient image information to characterize, in 3D, the robotand the location and extent of all relevant objects in the areasurrounding the robot at each analysis cycle. (Each analysis cycleincludes image capture, refresh of the frame buffers, and computationalanalysis; accordingly, although the period of the analysis or controlcycle is short enough for effective monitoring to occur in real time, itinvolves many computer clock cycles.) Analysis module 342 utilizes thisinformation along with instantaneous information about the current stateof the robot at each cycle to determine instantaneous, current safeaction constraints for the robot's motion. The constraints may becommunicated to the robot, either directly by analysis module 342 or viaa control routine 350, to the robot via transceiver 325 or and I/O port327.

The operation of the system is best understood with reference to theconceptual illustration of system organization and operation of FIG. 4.As described above, a sensor array 102 monitors the workspace 400, whichincludes a robot 402. The robot's movements are controlled by aconventional robot controller 407, which may be part of or separate fromthe robot itself; for example, a single robot controller may issuecommands to more than one robot. The robot's activities may primarilyinvolve a robot arm, the movements of which are orchestrated by robotcontroller 407 using joint commands that operate the robot arm joints toeffect a desired movement. An object-monitoring system (OMS) 410 obtainsinformation about objects from the sensors 102 and uses this sensorinformation to identify relevant objects in the workspace 400. OMS 410communicates with robot controller 407 via any suitable wired orwireless protocol. (In an industrial robot, control electronicstypically reside in an external control box. However, in the case of arobot with a built-in controller, OMS 410 communicates directly with therobot's onboard controller.) Using information obtained from the robot(and, typically, sensors 102), OMS 410 determines the robot's currentstate. OMS 410 thereupon determines safe-action constraints for robot402 given the robot's current state and all identified relevant objects.Finally, OMS 410 communicates the safe action constraints to robot 407.(It will be appreciated that, with reference to FIG. 3, the functions ofOMS 410 are performed in a control system 112 by analysis module 342and, in some cases, a control routine 350.)

4.1 Identifying Relevant Objects

The sensors 102 provide real-time image information that is analyzed byan object-analysis module 415 at a fixed frequency in the mannerdiscussed above; in particular, at each cycle, object analysis module415 identifies the precise 3D location and extent of all objects inworkspace 400 that are either within the robot's reach or that couldmove into the robot's reach at conservative expected velocities. If notall of the relevant volume is within the collective field of view of thesensors 102, OMS 410 may be configured to so determine and indicate thelocation and extent of all fixed objects within that region (or aconservative superset of those objects) and/or verify that otherguarding techniques have been used to prevent access to unmonitoredareas.

4.2 Determining Robot State

A robot state determination module (RSDM) 420 is responsive to data fromsensors 102 and signals from the robot 402 and/or robot controller 407to determine the instantaneous state of the robot. In particular, RSDM420 determines the pose and location of robot 402 within workspace 400;this may be achieved using sensors 102, signals from the robot and/orits controller, or data from some combination of these sources. RSDM 420may also determines the instantaneous velocity of robot 402 or anyappendage thereof; in addition, knowledge of the robot's instantaneousjoint accelerations or torques, or planned future trajectory may beneeded in order to determine safe motion constraints for the subsequentcycle as described below. Typically, this information comes from robotcontroller 407, but in some cases may be inferred directly from imagesrecorded by sensors 102 as described below.

For example, these data could be provided by the robot 402 or the robotcontroller 407 via a safety-rated communication protocol providingaccess to safety-rated data. The 3D pose of the robot may then bedetermined by combining provided joint positions with a static 3D modelof each link to obtain the 3D shape of the entire robot 402.

In some cases, the robot may provide an interface to obtain jointpositions that is not safety-rated, in which case the joint positionscan be verified against images from sensors 102 (using, for example,safety-rated software). For example, received joint positions may becombined with static 3D models of each link to generate a 3D model ofthe entire robot 402. This 3D image can be used to remove any objects inthe sensing data that are part of the robot itself. If the jointpositions are correct, this will fully eliminate all object dataattributed to the robot 402. If, however, the joint positions areincorrect, the true position of robot 402 will diverge from the model,and some parts of the detected robot will not be removed. Those pointswill then appear as a foreign object in the new cycle. On the previouscycle, it can be assumed that the joint positions were correct becauseotherwise robot 402 would have been halted. Since the base joint of therobot does not move, at least one of the divergent points must be closeto the robot. The detection of an unexpected object close to robot 402can then be used to trigger an error condition, which will cause controlsystem 112 (see FIG. 1) to transition robot 402 to a safe state.Alternately, sensor data can be used to identify the position of therobot using a correlation algorithm, such as described above in thesection on registration, and this detected position can be compared withthe joint position reported by the robot. If the joint positioninformation provided by robot 402 has been validated in this manner, itcan be used to validate joint velocity information, which can then beused to predict future joint positions. If these positions areinconsistent with previously validated actual joint positions, theprogram can similarly trigger an error condition. These techniquesenable use of a non-safety-rated interface to produce data that can thenbe used to perform additional safety functions.

Finally, RSDM 420 may be configured to determine the robot's joint stateusing only image information provided by sensors 102, without anyinformation provided by robot 402 or controller 407 sensors 102. Given amodel of all of the links in the robot, any of several conventional,well-known computer vision techniques can be used by RSDM 420 toregister the model to sensor data, thus determining the location of themodeled object in the image. For example, the ICP algorithm (discussedabove) minimizes the difference between two 3D point clouds. ICP oftenprovides a locally optimal solution efficiently, and thus can be usedaccurately if the approximate location is already known. This will bethe case if the algorithm is run every cycle, since robot 402 cannothave moved far from its previous position. Accordingly, globally optimalregistration techniques, which may not be efficient enough to run inreal time, are not required. Digital filters such as Kalman filters orparticle filters can then be used to determine instantaneous jointvelocities given the joint positions identified by the registrationalgorithm.

These image-based monitoring techniques often rely on being run at eachsystem cycle, and on the assumption that the system was in a safe stateat the previous cycle. Therefore, a test may be executed in when robot402 is started—for example, confirming that the robot is in a known,pre-configured “home” position and that all joint velocities are zero.It is common for automated equipment to have a set of tests that areexecuted by an operator at a fixed interval, for example, when theequipment is started up or on shift changes. Reliable state analysistypically requires an accurate model of each robot link. This model canbe obtained a priori, e.g. from 3D CAD files provided by the robotmanufacturer or generated by industrial engineers for a specificproject. However, such models may not be available, at least not for therobot and all of the possible attachments it may have.

In this case, it is possible for RSDM 420 to create the model itself,e.g., using sensors 102. This may be done in a separate training modewhere robot 402 runs through a set of motions, e.g., the motions thatare intended for use in the given application and/or a set of motionsdesigned to provide sensors 102 with appropriate views of each link. Itis possible, but not necessary, to provide some basic information aboutthe robot a priori, such as the lengths and rotational axes of eachlinks. During this training mode, RSDM 420 generates a 3D model of eachlink, complete with all necessary attachments. This model can then beused by RSDM 420 in conjunction with sensor images to determine therobot state.

4.3 Determining Safe-Action Constraints

In traditional axis- and rate-limitation applications, an industrialengineer calculates what actions are safe for a robot, given the plannedtrajectory of the robot and the layout of the workspace—forbidding someareas of the robot's range of motion altogether and limiting speed inother areas. These limits assume a fixed, static workplace environment.Here we are concerned with dynamic environments in which objects andpeople come, go, and change position; hence, safe actions are calculatedby a safe-action determination module (SADM) 425 in real time based onall sensed relevant objects and on the current state of robot 402, andthese safe actions may be updated each cycle. In order to be consideredsafe, actions should ensure that robot 402 does not collide with anystationary object, and also that robot 402 does not come into contactwith a person who may be moving toward the robot. Since robot 402 hassome maximum possible deceleration, controller 407 should be instructedto begin slowing the robot down sufficiently in advance to ensure thatit can reach a complete stop before contact is made.

One approach to achieving this is to modulate the robot's maximumvelocity (by which is meant the velocity of the robot itself or anyappendage thereof) proportionally to the minimum distance between anypoint on the robot and any point in the relevant set of sensed objectsto be avoided. The robot is allowed to operate at maximum speed when theclosest object is further away than some threshold distance beyond whichcollisions are not a concern, and the robot is halted altogether if anobject is within a certain minimum distance. Sufficient margin can beadded to the specified distances to account for movement of relevantobjects or humans toward the robot at some maximum realistic velocity.This is illustrated in FIG. 5. An outer envelope or 3D zone 502 isgenerated computationally by SADM 425 around the robot 504. Outside thiszone 502, all movements of the person P are considered safe because,within an operational cycle, they cannot bring the person sufficientlyclose to the robot 504 to pose a danger. Detection of any portion of theperson P's body within a second 3D zone 508, computationally definedwithin zone 502, is registered by SADM 425 but robot 504 is allowed tocontinue operating at full speed. If any portion of the person P crossesthe threshold of zone 508 but is still outside an interior danger zone510, robot 504 is signaled to operate at a slower speed. If any portionof the person P crosses into the danger zone 510 □ or is predicted to doso within the next cycle based on a model of human movement □ operationof robot 504 is halted. These zones may be updated if robot 504 is moved(or moves) within the environment.

A refinement of this technique is for SADM 425 to control maximumvelocity proportionally to the square root of the minimum distance,which reflects the fact that in a constant-deceleration scenario,velocity changes proportionally to the square root of the distancetraveled, resulting in a smoother and more efficient, but still equallysafe, result. A further refinement is for SADM 425 to modulate maximumvelocity proportionally to the minimum possible time to collision—thatis, to project the robot's current state forward in time, project theintrusions toward the robot trajectory, and identify the nearestpotential collision. This refinement has the advantage that the robotwill move more quickly away from an obstacle than toward it, whichmaximizes throughput while still correctly preserving safety. Since therobot's future trajectory depends not just on its current velocity buton subsequent commands, SADM 425 may consider all points reachable byrobot 402 within a certain reaction time given its current jointpositions and velocities, and cause control signals to be issued basedon the minimum collision time among any of these states. Yet a furtherrefinement is for SADM 425 to take into account the entire plannedtrajectory of the robot when making this calculation, rather than simplythe instantaneous joint velocities. Additionally, SADM 425 may, viarobot controller 407, alter the robot's trajectory, rather than simplyalter the maximum speed along that trajectory. It is possible to choosefrom among a fixed set of trajectories one that reduces or eliminatespotential collisions, or even to generate a new trajectory on the fly.

While not necessarily a safety violation, collisions with staticelements of the workspace are generally not desirable. The set ofrelevant objects can include all objects in the workspace, includingboth static background such as walls and tables, and moving objects suchas workpieces and human workers. Either from prior configuration orrun-time detection, sensors 102 and analysis module 342 may be able toinfer which objects could possibly be moving. In this case, any of thealgorithms described above can be refined to leave additional margins toaccount for objects that might be moving, but to eliminate those marginsfor objects that are known to be static, so as not to reduce throughputunnecessarily but still automatically eliminate the possibility ofcollisions with static parts of the work cell.

Beyond simply leaving margins to account for the maximum velocity ofpotentially moving objects, state estimation techniques based oninformation detected by the sensing system can be used to project themovements of humans and other objects forward in time, thus expandingthe control options available to control routines 350. For example,skeletal tracking techniques can be used to identify moving limbs ofhumans that have been detected and limit potential collisions based onproperties of the human body and estimated movements of, e.g., aperson's arm rather than the entire person.

4.4 Communicating Safe Action Constraints to the Robot

The safe-action constraints identified by SADM 425 may be communicatedby OMS 410 to robot controller 407 on each cycle via a robotcommunication module 430. As described above, communication module maycorrespond to an I/O port 327 interface to a complementary port on robotcontroller 407 or may correspond to transceiver 325. Most industrialrobots provide a variety of interfaces for use with external devices. Asuitable interface should operate with low latency at least at thecontrol frequency of the system. The interface can be configured toallow the robot to be programmed and run as usual, with a maximumvelocity being sent over the interface. Alternately, some interfacesallow for trajectories to be delivered in the form of waypoints. Usingthis type of an interface, the intended trajectory of robot 402 can bereceived and stored within OMS 410, which may then generate waypointsthat are closer together or further apart depending on the safe-actionconstraints. Similarly, an interface that allows input of target jointtorques can be used to drive trajectories computed in accordanceherewith. These types of interface can also be used where SADM 425chooses new trajectories or modifies trajectories depending on thesafe-action constraints.

As with the interface used to determine robot state, if robot 402supports a safety-rated protocol that provides real-time access to therelevant safety-rated control inputs, this may be sufficient. However, asafety-rated protocol is not available, additional safety-rated softwareon the system can be used to ensure that the entire system remains safe.For example, SADM 425 may determine the expected speed and position ofthe robot if the robot is operating in accordance with the safe actionsthat have been communicated. SADM 425 then determines the robot's actualstate as described above. If the robot's actions do not correspond tothe expected actions, SADM 425 causes the robot to transition to a safestate, typically using an emergency stop signal. This effectivelyimplements a real-time safety-rated control scheme without requiring areal-time safety-rated interface beyond a safety-rated stoppingmechanism.

In some cases a hybrid system may be optimal—many robots have a digitalinput that can be used to hold a safety-monitored stop. It may bedesirable to use a communication protocol for variable speed, forexample, when intruding objects are relatively far from the robot, butto use a digital safety-monitored stop when the robot must come to acomplete stop, for example, when intruding objects are close to therobot.

Certain embodiments of the present invention are described above. It is,however, expressly noted that the present invention is not limited tothose embodiments; rather, additions and modifications to what isexpressly described herein are also included within the scope of theinvention.

What is claimed is:
 1. A safety system for identifying safe regions in athree-dimensional (3D) workspace including machinery performing aplanned activity, the system comprising: a plurality of sensorsdistributed about the workspace, each of the sensors comprising a gridof pixels for recording images of a portion of the workspace within asensor field of view, the workspace portions collectively covering theentire workspace; a computer memory for storing (i) a plurality ofimages from the sensors, (ii) a model of the machinery and its permittedmovements during performance of the activity, and (iii) a safetyprotocol specifying speed restrictions of the machinery in proximity toa human and a minimum separation distance between the machinery and ahuman; and a processor configured to: computationally generate, from thestored images, a 3D spatial representation of the workspace; identifyand monitor over time a representation of space occupied by themachinery within the workspace as a 3D machinery region andcomputationally define, around the machinery region, a 3D enveloperegion spanning all points reachable by the machinery only duringperformance of the planned activity in accordance with the stored model,the 3D envelope region encompassing less than all points that themachinery is capable of reaching; recognize interaction between themachinery and a workpiece within the workspace; in response to therecognized interaction, update the 3D envelope region to include theworkpiece; and computationally generate a 3D safe zone around themachinery region, the 3D safe zone including the 3D envelope region asupdated, in accordance with the safety protocol.
 2. The safety system ofclaim 1, wherein the processor is further configured to: identify ahuman-occupied region in the volume corresponding to space occupied orpotentially occupied by a human within the workspace; and restrictingthe machinery's activity in accordance with the safety protocol based onproximity between the machinery region and the human-occupied region. 3.The safety system of claim 2, wherein the human-occupied region isaugmented by a 3D envelope around the human corresponding to anticipatedmovements of the human within the workspace within a predeterminedfuture time.
 4. The safety system of claim 1, wherein the processor isfurther configured to recognize, in the images, items in the workspaceother than the machinery and the workpiece, the processor identifying,as human, detected items not part of the machinery or workpiece and nototherwise recognized.
 5. The safety system of claim 4, wherein theprocessor is configured to detect, in the images, items within theworkspace and to receive externally provided identifications thereof,the processor identifying, as human, detected items not part of themachinery or workpiece and for which no externally providedidentification has been received.
 6. The safety system of claim 1,wherein the workspace is computationally represented as a plurality ofvoxels.
 7. The safety system of claim 1, wherein the machinery is atleast one robot and the current state corresponds to current jointpositions and velocities of the robot.
 8. The system of claim 1, whereinthe 3D envelope region is spatially smaller than and lies within aspatial region encompassing all points that the machinery iskinematically capable of reaching.
 9. The system of claim 1, wherein the3D envelope region, after being updated to include the workpiece,comprises points extending beyond a spatial region encompassing allpoints that the machinery is kinematically capable of reaching prior tothe recognized interaction with the workpiece.
 10. The system of claim1, wherein a second 3D safe zone extends beyond the 3D envelope regionas updated to define an outer safety zone, entry of the human-occupiedregion into the second 3D safe zone causing the processor to operate themachinery at a reduced speed.
 11. A method of safely operating machineryin a three-dimensional (3D) workspace, the method comprising the stepsof: monitoring the workspace with a plurality of sensors distributedthereabout, each of the sensors comprising a grid of pixels forrecording images of a portion of the workspace within a sensor field ofview, the workspace portions partially overlapping with each other;registering the sensors with respect to each other so that the imagesobtained by the sensors collectively represent the workspace; storing,in a computer memory, (i) a plurality of images from the sensors, (ii) amodel of the machinery and its permitted movements during performance ofa planned activity, and (iii) a safety protocol specifying speedrestrictions of the machinery in proximity to a human and a minimumseparation distance between a machine and a human; computationallygenerating, from the stored images, a 3D spatial representation of theworkspace; computationally identifying and monitoring over time arepresentation of space occupied by the machinery within the workspaceas a 3D machinery region and computationally defining, around themachinery region, a 3D envelope region spanning all points reachable bythe machinery only during performance of the planned activity inaccordance with the stored model, the 3D envelope region encompassingless than all points that the machinery is capable of reaching;recognizing interaction between the machinery and a workpiece within theworkspace; in response to the recognized interaction, computationallyupdating the 3D envelope region to include the workpiece; andcomputationally generating a 3D safe zone around the machinery region,the 3D safe zone including the 3D envelope region as updated, inaccordance with the safety protocol.
 12. The method of claim 11, furthercomprising the steps of: identifying a human-occupied region in thevolume corresponding to space occupied by a human within the workspace;and restricting the machinery's activity in accordance with the safetyprotocol based on proximity between the machinery region and thehuman-occupied region.
 13. The method of claim 12, further comprisingthe step of augmenting the human-occupied region by a 3D envelope aroundthe human corresponding to anticipated movements of the human within theworkspace within a predetermined future time.
 14. The method of claim11, further comprising the steps of (i) recognizing, in the images,items in the workspace other than the machinery and the workpiece, and(ii) identifying, as human, detected items not part of the machinery orworkpiece and not otherwise recognized.
 15. The method of claim 14,further comprising the steps of (i) detecting, in the images, itemswithin the workspace and receiving externally provided identificationsthereof, and (ii) identifying, as human, detected items not part of themachinery or workpiece and for which no externally providedidentification has been received.
 16. The method of claim 11, whereinthe workspace is computationally represented as a plurality of voxels.17. The method of claim 11, wherein the machinery is at least one robotand the current state corresponds to current joint positions andvelocities of the robot.
 18. The method of claim 11, wherein the 3Denvelope region is spatially smaller than and lies within a spatialregion encompassing all points that the machinery is kinematicallycapable of reaching.
 19. The method of claim 11, wherein the 3D enveloperegion, after being updated to include the workpiece, comprises pointsextending beyond a spatial region encompassing all points that themachinery is kinematically capable of reaching prior to the recognizedinteraction with the workpiece.
 20. The method of claim 11, wherein asecond 3D safe zone extends beyond the 3D envelope region as updated todefine an outer safety zone, entry of the human-occupied region into thesecond 3D safe zone causing the machinery to operate at a reduced speed.